﻿#ifndef FASTPOINTTASKFORM_H
#define FASTPOINTTASKFORM_H

#include <QWidget>
#include<QTableWidgetItem>
#include "taskeditor.h"

namespace Ui {
class FastPointTaskForm;
}

class FastPointTaskForm : public QWidget,public TaskEditor
{
    Q_OBJECT

public:
    explicit FastPointTaskForm(QWidget *parent = 0);
    ~FastPointTaskForm();
    // TaskEditor interface
public:
    void generateTask(TaskItem *pTask);

    void setCurrentTask(const QString &sName);

    void setCurrentMode(int nMode);

    void updateTask(TaskItem *pTask);
private slots:
    void on_pushButton_AddCycle_clicked();

    void on_pushButton_DeCycle_clicked();

    void on_pushButton_CalPos_clicked();

    void on_pushButton_AddTimes_clicked();

    void on_pushButton_DeduceTimes_clicked();

    void on_pushButton_saveToConfig_clicked();

private:
    enum TableCol
    {
        Table_Name = 0,
        Table_WorkMode,
        Table_EWEnd,
        Table_NSEnd,
        Table_STime,
        Table_ETime,
        Table_TotTime,
        Table_EWStart,
        Table_NSStart
    };
    Ui::FastPointTaskForm *ui;
};

#endif // FASTPOINTTASKFORM_H
